/*
 * 1241. 转换字符串到整数（容易版）
 * Given a string, convert it to an integer. 
 * You may assume the string is a valid integer number that can be presented by a signed 32bit integer (-231 ~ 231-1).
 * https://www.lintcode.com/problem/string-to-integer/description
 * 
 * 样例
 * 给出 "123", 返回 123.
 * 
 * 2018.06.10 @jeyming
 */
package string_to_integer_1241;

public class String_to_integer_1241 {

	/**
	 * @param str: A string
	 * @return: An integer
	 */
	public static int stringToInteger(String str) {
		// write your code here
		return Integer.parseInt(str);

	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.println(stringToInteger("123"));
	}

}
